# Maintainer: George Rawlinson <george@rawlinson.net.nz>

pkgname=endless-sky-high-dpi
pkgver=0.9.16
pkgrel=1
pkgdesc='High DPI sprites for Endless Sky'
arch=('any')
url='https://github.com/endless-sky/endless-sky-high-dpi'
license=(
  'GPL3'
  'custom:CC-BY-4.0'
  'custom:CC-BY-SA-3.0'
  'custom:CC-BY-SA-4.0'
  'custom:public-domain'
)
depends=('endless-sky')
makedepends=('git')
_commit='3964aaa35b16c57d052a12fc04d8b24d89d1cca2'
source=("$pkgname::git+$url#commit=$_commit")
b2sums=('SKIP')

pkgver() {
  cd "$pkgname"

  git describe --tags | sed 's/^v//'
}

package() {
  cd "$pkgname"

  # create plugin directory
  install -d "$pkgdir/usr/share/games/endless-sky/plugins/$pkgname"

  # install plugin
  cp -r * "$pkgdir/usr/share/games/endless-sky/plugins/$pkgname"

  # license
  install -Dm644 -t "$pkgdir/usr/share/licenses/$pkgname" copyright
}
